package com.ljf.utility.dto.command;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ljf.common.validation.AddGroup;
import com.ljf.common.validation.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 编译目录表--新增修改  utility_dat_compile_tabulation
 *
 * @author LJF
 * @since 2025-08-30
 */
@Data
@ApiModel("编译目录表--新增修改")
public class UtilityDatCompileTabulationCommand implements Serializable {

    @JsonProperty("id")
    @ApiModelProperty(value = "ID")
    @NotNull(message = "ID不能为空", groups = {UpdateGroup.class})
    private Long id;

    @JsonProperty("name")
    @ApiModelProperty(value = "名称")
    @Length(message = "名称不能超过30个字符", max = 30)
    @NotEmpty(message = "名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

}
